package models;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.Id;

import play.db.jpa.GenericModel;

@Entity
public class SkillCategory extends GenericModel {

	@Id
	@Column(name = "SKILL_CATEGORY_ID")
	private int skillCategoryID;

	@Column(name = "category_name")
	private String skillCategoryName;

	public SkillCategory() {
		this(0, null);
	}

	public SkillCategory(int skillCategoryID, String skillCategoryName) {
		super();
		this.skillCategoryID = skillCategoryID;
		this.skillCategoryName = skillCategoryName;
	}

	public int getSkillCategoryID() {
		return skillCategoryID;
	}

	public void setSkillCategoryID(int skillCategoryID) {
		this.skillCategoryID = skillCategoryID;
	}

	public String getSkillCategoryName() {
		return skillCategoryName;
	}

	public void setSkillCategoryName(String skillCategoryName) {
		this.skillCategoryName = skillCategoryName;
	}

	@Override
	public String toString() {
		return "SkillCategory [skillCategoryID=" + skillCategoryID
				+ ", skillCategoryName=" + skillCategoryName + "]";
	}

	@Override
	public int hashCode() {
		final int prime = 31;
		int result = super.hashCode();
		result = prime * result + skillCategoryID;
		result = prime
				* result
				+ ((skillCategoryName == null) ? 0 : skillCategoryName
						.hashCode());
		return result;
	}

	@Override
	public boolean equals(Object obj) {
		if (this == obj)
			return true;
		if (!super.equals(obj))
			return false;
		if (getClass() != obj.getClass())
			return false;
		SkillCategory other = (SkillCategory) obj;
		if (skillCategoryID != other.skillCategoryID)
			return false;
		if (skillCategoryName == null) {
			if (other.skillCategoryName != null)
				return false;
		} else if (!skillCategoryName.equals(other.skillCategoryName))
			return false;
		return true;
	}
}
